package com.zhumei.keyscale.entity;

import java.util.*;

public class EventBean<T>
{
    private int code;
    private T data;
    private T[] datas;
    
    public EventBean(final int code) {
        this.code = code;
    }
    
    public EventBean(final int code, final T data) {
        this.code = code;
        this.data = data;
    }
    
    @SafeVarargs
    public EventBean(final int code, final T... datas) {
        this.code = code;
        this.datas = datas;
    }
    
    public int getCode() {
        return this.code;
    }
    
    public T getData() {
        return this.data;
    }
    
    public T[] getDatas() {
        return this.datas;
    }
    
    public void setCode(final int code) {
        this.code = code;
    }
    
    public void setData(final T data) {
        this.data = data;
    }
    
    public void setDatas(final T[] datas) {
        this.datas = datas;
    }
    
    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("EventBean{code=");
        sb.append(this.code);
        sb.append(", data=");
        sb.append(this.data);
        sb.append(", datas=");
        sb.append(Arrays.toString(this.datas));
        sb.append('}');
        return sb.toString();
    }
}
